'use strict';

/**
 * @ngdoc function
 * @name newWfApp.controller:MainCtrl
 * @description
 * # MainCtrl
 * Controller of the newWfApp
 */
angular.module('newWfApp')
        .controller('HumanTaskListController', function ($scope, $http, $location) {
            
            $scope.openDetail = openDetail;        
        
            $http.get('http://10.28.6.9:8080/NDK_WF_AL/task/getHumanTasks').then(function (response) {
                $scope.tasks = response.data.taskSimpleQueryResultSet.row;
            });
            
            function openDetail(task){
                $location.path("/human/tasks/" + task.id);
            }

        });

